class Video(object):
    id = None
    vid = None
    name = None
    url = None
    path = None
    img = None
    real_url = None
    create_time = None
    creator_id = None
    creator_nick = None
    platform = None
    title = None
    tags = None
    duration = None

    is_uploaded = False  # 上传过

    def keys(self):
        return ('id', 'vid', 'name', 'url', 'path', 'img', 'real_url', 'create_time', 'creator_id', 'creator_nick', 'platform', 'title', 'tags', 'duration', 'is_uploaded')

    def __getitem__(self, item):
        return getattr(self, item)


class Uploader(object):
    id = None
    account = None
    pwd = None
    platform_id = None
    platform_name = None
    selected = None
    status = None
    number = None       # 最大上传视频数
    uploaded_num = None # 已上传视频数

    def keys(self):
        return ('id', 'account', 'pwd', 'platform_id', 'selected', 'status', 'number')

    def __getitem__(self, item):
        return getattr(self, item)
